Rename gtkiconcachevalidator.h
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 1 Feb 2018 15:01:38 +0000 (16:01 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 1 Feb 2018 15:01:38 +0000 (16:01 +0100)
Follow the same convention for private headers as newer parts of GTK.

gtk/gtkiconcache.c
gtk/gtkiconcachevalidator.c
gtk/gtkiconcachevalidator.h [deleted file]
gtk/gtkiconcachevalidatorprivate.h [new file with mode: 0644]
gtk/meson.build
gtk/updateiconcache.c

index d4407892f6b64e6ef2673574d839874d830f5375..54cdbfd803f270c14af2f077483c64c4d7a68845 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "gtkdebug.h"
 #include "gtkiconcacheprivate.h"
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 #include <glib/gstdio.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
index 118eae0f0e8c2eaa22c62daf63990a89fc353a72..7ad1c10329037bc3604b5dda16b7669499bf0c9a 100644 (file)
@@ -15,7 +15,7 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 #include "config.h"
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 #include <glib.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
@@ -369,7 +369,7 @@ check_hash (CacheInfo *info,
 }
 
 /**
- * _gtk_icon_cache_validate:
+ * gtk_icon_cache_validate:
  * @info: a CacheInfo structure
  *
  * Validates the icon cache passed in the @cache and
@@ -383,7 +383,7 @@ check_hash (CacheInfo *info,
  * Returns: %TRUE if the cache is valid
  */
 gboolean
-_gtk_icon_cache_validate (CacheInfo *info)
+gtk_icon_cache_validate (CacheInfo *info)
 {
   guint32 hash_offset;
   guint32 directory_list_offset;
diff --git a/gtk/gtkiconcachevalidator.h b/gtk/gtkiconcachevalidator.h
deleted file mode 100644 (file)
index 5c59cf2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* gtkiconcachevalidator.4
- * Copyright (C) 2007 Red Hat, Inc
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef __GTK_ICON_CACHE_VALIDATOR_H__
-#define __GTK_ICON_CACHE_VALIDATOR_H__
-
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-enum {
-  CHECK_OFFSETS = 1,
-  CHECK_STRINGS = 2,
-  CHECK_PIXBUFS = 4
-};
-
-typedef struct {
-  const gchar *cache;
-  gsize cache_size;
-  guint32 n_directories;
-  gint flags;
-} CacheInfo;
-
-gboolean _gtk_icon_cache_validate (CacheInfo *info);
-
-G_END_DECLS
-
-#endif  /* __GTK_ICON_CACHE_VALIDATOR_H__ */
diff --git a/gtk/gtkiconcachevalidatorprivate.h b/gtk/gtkiconcachevalidatorprivate.h
new file mode 100644 (file)
index 0000000..c5e1e33
--- /dev/null
@@ -0,0 +1,41 @@
+/* gtkiconcachevalidator.4
+ * Copyright (C) 2007 Red Hat, Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__
+#define __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+enum {
+  CHECK_OFFSETS = 1,
+  CHECK_STRINGS = 2,
+  CHECK_PIXBUFS = 4
+};
+
+typedef struct {
+  const gchar *cache;
+  gsize cache_size;
+  guint32 n_directories;
+  gint flags;
+} CacheInfo;
+
+gboolean gtk_icon_cache_validate (CacheInfo *info);
+
+G_END_DECLS
+
+#endif  /* __GTK_ICON_CACHE_VALIDATOR_PRIVATE_H__ */
index ff6ebe7262d5bc03eef9556fc4342af7c2954972..cb450e214aa64f865488d4719b193df866fbc75f 100644 (file)
@@ -1038,7 +1038,7 @@ libgtk_dep = declare_dependency(sources: gtk_dep_sources,
 gtk_tools = [
   ['gtk4-query-settings', ['gtk-query-settings.c']],
   ['gtk4-builder-tool', ['gtk-builder-tool.c']],
-  ['gtk4-update-icon-cache', ['updateiconcache.c']],
+  ['gtk4-update-icon-cache', ['updateiconcache.c', 'gtkiconcachevalidator.c']],
   ['gtk4-encode-symbolic-svg', ['encodesymbolic.c', 'gdkpixbufutils.c']],
   ['gtk4-query-immodules', ['queryimmodules.c', 'gtkutils.c']],
 ]
index fe2eb8fc647cef44136a6a024292a98a7023f981..92f0924f23ac3c20cc924ec819478a9234bf8630 100644 (file)
@@ -39,7 +39,7 @@
 #include <glib/gstdio.h>
 #include <gdk-pixbuf/gdk-pixdata.h>
 #include <glib/gi18n.h>
-#include "gtkiconcachevalidator.h"
+#include "gtkiconcachevalidatorprivate.h"
 
 static gboolean force_update = FALSE;
 static gboolean ignore_theme_index = FALSE;
@@ -48,11 +48,6 @@ static gboolean index_only = TRUE;
 static gboolean validate = FALSE;
 static gchar *var_name = (gchar *) "-";
 
-/* Quite ugly - if we just add the c file to the
- * list of sources in Makefile.am, libtool complains.
- */
-#include "gtkiconcachevalidator.c"
-
 #define CACHE_NAME "icon-theme.cache"
 
 #define HAS_SUFFIX_XPM (1 << 0)
@@ -1427,7 +1422,7 @@ validate_file (const gchar *file)
   info.n_directories = 0;
   info.flags = CHECK_OFFSETS|CHECK_STRINGS|CHECK_PIXBUFS;
 
-  if (!_gtk_icon_cache_validate (&info))
+  if (!gtk_icon_cache_validate (&info))
     {
       g_mapped_file_unref (map);
       return FALSE;